<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_validator = $show_scroll = $show_dialog = 1;
include $this->admin_tpl('header', 'admin');

?>
<h3 style="padding-left: 20px;padding-top: 10px">
	<?php echo $reg_info['title']?>——订单统计
	<a href="?m=reg_child&c=manage&a=init" style="font-size:14px;color: #0000FF"><em>返回上一级</em></a>
</h3>

<div class="subnav">

</div>
<div class="pad-lr-10">
	<form name="searchform" action="" method="get">
		<input type="hidden" value="reg_child" name="m">
		<input type="hidden" value="manage" name="c">
		<input type="hidden" value="order_statistics" name="a">
		<input type="hidden" value="<?php echo $_GET['res_id']?>" name="res_id">
		<table width="100%" cellspacing="0" class="search-form">
			<tbody>
			<tr>
				<td>
					<div class="explain-col">
						<?php echo L('name');?>：<input name="name" type="text" value="<?php if(isset($name)) {echo $name;}?>"
										 class="input-text"  style='width: 200px;' placeholder='输入名称关键字进行查询...'/>
						<?php echo L('order_id');?>：<input name="order_id" type="text" value="<?php if(isset($order_id)) {echo $order_id;}?>"
										 class="input-text"  style='width: 200px;' placeholder='请输入订单号ID进行查询...'/>
						<input type="submit" name="search"  class="button" value="<?php echo L('search')?>" />
					</div>
				</td>
			</tr>
			</tbody>
		</table>
	</form>

	<form name="myform" id="myform" action="" method="post" onsubmit="return confirm('<?php echo L('confirm')?>')">
		<div class="table-list">
			<table width="100%">
				<thead>
				<tr>
					<th width="20">ID</th>
					<th width="60"><?php echo L('name');?></th>
					<th width="100"><?php echo L('price');?></th>
					<th width="60"><?php echo L('count')?></th>
					<th width="60"><?php echo L('description')?></th>
					<th width="100"><?php echo L('order_id');?></th>
					<th width="120"><?php echo L('create_time');?></th>
				</tr>
				</thead>
				<tbody>
				<?php
				if(!empty($order_info)){
					if(is_array($order_info)) {
	
						foreach ($order_info as $k=> $r) {
							?>
							<tr>
								<td align="center"><?php echo $r['id']?></td>
								<td align='center'><?php echo $r['name']?></td>
								<td align='center' ><?php if(!empty($r['price'])){echo $r['price'];}else{echo "<font color='red'>未设置</font>";}?></td>
								<td align='center' ><?php if(!empty($r['count'])){echo $r['count'];}else{echo "<font color='red'>未设置</font>";}?></td>
								<td align='center' ><?php if(!empty($r['describe'])){echo $r['describe'];}else{echo '<font color="red">（未设置）</font>';}?></td>
								<td align='center'><?php if(!empty($r['order_id'])){echo $r['order_id'];}else{echo "<font color='red'>未设置</font>";}?></td>
								<td align='center'><?php if(!empty($r['create_time'])){echo $r['create_time'];}else{echo "<font color='red'>未设置</font>";}?></td>
							</tr>
						<?php }
					}
				}else{
				?>
					<tr><td colspan='9' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>
				<?php }?>
				</tbody>
			</table>
			<div id="pages"><?php echo $pages;?></div>
		</div>
	</form>
</div>
</body>
</html>